<!--
 * @Author: your name
 * @Date: 2021-08-19 15:04:22
 * @LastEditTime: 2021-08-19 15:24:39
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\4-云服务器\day01\2-flex.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent {
            height: 600px;
            border: 1px solid red;
            display: flex;
            /* 行排列，列布局 */
            flex-direction: row;
            /* 换行，默认不换行 */
            flex-wrap: wrap;
            /* 排列方向从右边开始 */
            /* flex-direction: row-reverse; */
            /* 列排列，行布局 */
            /* flex-direction: column; */
            /* flex-direction: column-reverse; */
            /* 多主轴排列方式 */
            align-content: flex-start;
            align-content: flex-end;
            align-content: center;
            align-content: space-between;
            align-content: space-around;
        }
        
        .child {
            background-color: seagreen;
            /* margin: 20px; */
            /* 设置占满父元素的剩余空间 */
            flex: 200px 1;
            height: 200px;
        }
        
        .child:nth-child(odd) {
            background-color: tomato;
            /* flex: 2; */
        }
    </style>
</head>

<body>
    <div class="parent">
        <div class="child">1</div>
        <div class="child">2</div>
        <div class="child">3</div>
        <div class="child">4</div>
        <div class="child">5</div>
    </div>
</body>

</html>
</div>
</body>

</html>

</html>

</html>

</html>

</html>

</html>

</html>